<!-- 自定义通用推窗组件 -->
<template>
  <el-drawer v-bind="$attrs">
    <div
      :style="{
        paddingBottom: slot.footer ? '60px' : '',
      }"
    >
      <slot></slot>
      <div
        v-if="slot.footer"
        :style="{
          borderTop: '1px solid #e8e8e8',
          borderRadius: '0 0 4px 4px',
        }"
        class="absolute bottom-0 left-0 w-[100%] h-[60px] bg-white p-4 z-50"
      >
        <slot name="footer"></slot>
      </div>
    </div>
  </el-drawer>
</template>

<script lang="ts" setup>
  import { useSlots } from 'vue';
  const slot = useSlots();
</script>
